#ifndef _DevicesLed_H_
#define _DevicesLed_H_

#include "Version.h"



#define LED_RED        0x10
#define LED_GREEN      0x20
#define LED_YELLOW     0x40

#define LED_ALL        0xFF




#define LED_RED_RCC_GPIO_CLK_ENABLE()        __HAL_RCC_GPIOF_CLK_ENABLE()
#define LED_RED_GPIO_Port                    GPIOF
#define LED_RED_Pin                          GPIO_PIN_9

#define LED_GREEN_RCC_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOF_CLK_ENABLE()
#define LED_GREEN_GPIO_Port                  GPIOF
#define LED_GREEN_Pin                        GPIO_PIN_10

#define LED_YELLOW_RCC_GPIO_CLK_ENABLE()     __HAL_RCC_GPIOF_CLK_ENABLE()
#define LED_YELLOW_GPIO_Port                 GPIOF
#define LED_YELLOW_Pin                       GPIO_PIN_11













typedef enum {
    LED_DISABLE = 0,
    LED_ENABLE,
    LED_SLOW,
    LED_FAST,
} LedStateEnum;


typedef struct{
    uint8_t red;
    uint8_t green;
    uint8_t yellow;
}LedStateType;



extern LedStateType ex_typeLedState;










void vLedInit(void);
void vLedOpen(uint8_t ucNumber);
void vLedClose(uint8_t ucNumber);
void vLedRevesal(uint8_t ucNumber);

void vLedSetStatus(uint8_t ucNumber, uint32_t uiStatus);


#define LED_OPEN()      vLedOpen(LED_ALL)
#define LED_CLOSE()     vLedClose(LED_ALL)
#define LED_REVESAL()   vLedRevesal(LED_ALL)


#endif
